<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <meta name="mobile-web-app-capable" content="yes" />
        <link rel="icon" href="./favicon.ico" />
        <title><%= htmlWebpackPlugin.options.title %></title>
        <% if (htmlWebpackPlugin.options.mode === 'production') { %>
        <script>
            // Check that service workers are registered
            if ('serviceWorker' in navigator) {
                // Use the window load event to keep the page load performant
                window.addEventListener('load', function () {
                    navigator.serviceWorker.register('./service-worker.js').catch(function () {
                        console.log('Service Worker not loaded');
                    });
                });
            }
        </script>
        <% } %>
    </head>
    <body>
        <noscript> JavaScript is required in order to use this app </noscript>
        <div id="root"></div>
    </body>
</html>
